﻿using NUnit.Framework;

namespace Bddify.Tests.Reporters
{
    [TestFixture]
    public class WhenAddingALine : HtmlReportSpecs
    {
        public override void Given()
        {
            SUT.TabCount = 3;
        }

        public override void When()
        {
            SUT.AddLine("anonymous");
        }

        [Test]
        public void ShouldReturnLineWithPaddingAndCarriageReturn()
        {
            Assert.That(HtmlString, Is.EqualTo("      anonymous\r\n"));
        }

        [Test]
        public void ShouldIndentLineAccordingToTabCount()
        {
            Assert.That(HtmlString.StartsWith("      a"));
        }

        [Test]
        public void ShouldEndWithCarriageReturn()
        {
            Assert.That(HtmlString.EndsWith("s\r\n"));
        }
    }
}
